package com.aspose.cells.b.a.d;

import com.aspose.cells.b.a.zv;

public abstract class zr {
   public static final zr h = new zr.za();
   private static final String a = System.getProperty("line.separator");
   protected static char[] i;

   public void b() throws Exception {
      this.a(true);
   }

   protected void a(boolean var1) throws Exception {
   }

   public void c() throws Exception {
   }

   public void b(String var1) {
      if (var1 == null) {
         var1 = a;
      }

      i = var1.toCharArray();
   }

   public abstract void a(char var1) throws Exception;

   public void a(char[] var1) throws Exception {
      if (var1 != null) {
         this.a(var1, 0, var1.length);
      }

   }

   public void a(char[] var1, int var2, int var3) throws Exception {
      if (var1 == null) {
         throw new NullPointerException("buffer");
      } else if (var2 < 0) {
         throw new IndexOutOfBoundsException("index");
      } else if (var3 < 0) {
         throw new IndexOutOfBoundsException("count");
      } else if (var1.length - var2 < var3) {
         throw new IllegalArgumentException("(buffer.length - index) should be less than count");
      } else {
         for(int var4 = 0; var4 < var3; ++var4) {
            this.a(var1[var2 + var4]);
         }

      }
   }

   public void a(String var1) throws Exception {
      if (var1 != null) {
         this.a(var1.toCharArray());
      }

   }

   public void f() throws Exception {
      this.a(i);
   }

   public void c(String var1) throws Exception {
      if (var1 == null) {
         this.f();
      } else {
         int var2 = var1.length();
         int var3 = i.length;
         char[] var4 = new char[var2 + var3];
         zv.a(var1, 0, var4, 0, var2);
         if (var3 == 2) {
            var4[var2] = i[0];
            var4[var2 + 1] = i[1];
         } else if (var3 == 1) {
            var4[var2] = i[0];
         } else {
            System.arraycopy(i, 0, var4, var2 * 2, var3 * 2);
         }

         this.a(var4, 0, var2 + var3);
      }

   }

   static {
      i = a.toCharArray();
   }

   private static final class za extends zr {
      public void a(char var1) {
      }

      public void a(char[] var1, int var2, int var3) {
      }

      public void a(String var1) {
      }

      public void f() {
      }

      public void c(String var1) {
      }
   }
}
